package config

type ServerConfig struct {
	Port        int         `mapstructure:"port" json:"port"`
	Host        string      `mapstructure:"host" json:"host"`
	FilePath    string      `mapstructure:"file_path" json:"file_path"`
	WaterMark   string      `mapstructure:"water_mark" json:"water_mark"`
	JWTConfig   JWTConfig   `mapstructure:"jwt" json:"jwt"`
	RedisConfig RedisConfig `mapstructure:"redis" json:"redis"`
	MySqlConfig MySqlConfig `mapstructure:"mysql" json:"mysql"`
	EsConfig    EsConfig    `mapstructure:"es" json:"es"`
}

type JWTConfig struct {
	SigningKey string `mapstructure:"signing_key"`
}

type RedisConfig struct {
	Host     string `mapstructure:"host" json:"host"`
	Port     int    `mapstructure:"port" json:"port"`
	Password string `mapstructure:"password" json:"password"`
}

type EsConfig struct {
	Host string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
}

type MySqlConfig struct {
	Host     string `mapstructure:"host" json:"host"`
	Port     int    `mapstructure:"port" json:"port"`
	Name     string `mapstructure:"name" json:"name"`
	User     string `mapstructure:"user" json:"user"`
	Password string `mapstructure:"password" json:"password"`
}

type HostConfig struct {
	Host string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
}
